<?php
/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */

namespace Jhub1_Admin\Controller;

use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;
use Jhub1_Admin\Form\Registration;
use Jhub1_Admin\Model\FormFilter\RegistrationFilter;
use Zend\Session\Container;


class MyaccountController extends AbstractActionController
{
    public function indexAction()
    {
        $session_user = new Container('user');
        $userPO = $session_user->offsetGet('userobject');
        //localization
        $localizationObj = $userPO->getLocalization();
        $localization = $localizationObj->getObjectVars();

        //localization
        $configurationObj = $userPO->getConfiguration();
        $configuration = $configurationObj->getObjectVars();

        //personal
        $personal = array('email' => $userPO->getEmail(),
            'name' => $userPO->getName(),
            'surname' => $userPO->getSurname()
        );


        return new ViewModel(array('localization' => $localization,
            'personal' => $personal,
            'configuration' => $configuration));
    }

}